package com.kingyun.gpsinspection.purificationservice.services.jsm.innerservice.impl.button;

import com.kingyun.gpsinspection.purificationservice.dao.mapper.jsm.ButtonMapper;
import com.kingyun.gpsinspection.purificationservice.facade.model.jsm.Button;
import com.kingyun.gpsinspection.purificationservice.facade.service.jsm.button.JsmButtonService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

/**
 * @Author 卢曼成
 * @Description 按钮类
 * @Date 2017/2/20 17:04
 */

public class JsmButtonServiceImpl implements JsmButtonService {
    @Autowired
    private ButtonMapper buttonMapper;

    @Override
    public int deleteByPrimaryKey(String buttonId) {
        return buttonMapper.deleteByPrimaryKey(buttonId);
    }

    @Override
    public int insert(Button record) {
        return buttonMapper.insert(record);
    }

    @Override
    public int insertSelective(Button record) {
        return buttonMapper.insertSelective(record);
    }

    @Override
    public Button selectByPrimaryKey(String buttonId) {
        return buttonMapper.selectByPrimaryKey(buttonId);
    }

    @Override
    public int updateByPrimaryKeySelective(Button record) {
        return buttonMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(Button record) {
        return buttonMapper.updateByPrimaryKey(record);
    }

    /**
     * @param list
     * @Author 卢曼成
     * @Description 批量添加
     * @Date 2017/2/8 17:17
     */
    @Override
    public int insertList(List<Button> list) {
        return buttonMapper.insertList(list);
    }

    /**
     * @param list
     * @Author 卢曼成
     * @Description 批量逻辑删除
     * @Date 2017/2/8 17:17
     */
    @Override
    public int deleteList(List<Button> list) {
        return buttonMapper.deleteList(list);
    }

    /**
     * @param list
     * @Author 卢曼成
     * @Description 根据条件查询ID集合
     * @Date 2017/2/8 17:17
     */
    @Override
    public List<String> selectByListId(List<Button> list) {
        return buttonMapper.selectByListId(list);
    }
}
